package com.jxtc.enterprise.tenant.vo;

import com.jxtc.enterprise.common.entity.Company;
import com.jxtc.enterprise.common.vo.CompanyVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * 此vo 用于记录 公司管理页面，列表中公司信息，属于公司简要信息
 * 与 TenantCompanyMoreDetailVO 区别是，后者有更多的信息，用来记录 查看公司详情 按钮 弹窗中展示的数据
 */
@Schema(description = "租户管理平台公司管理页面每一行的公司信息")
@Getter
@Setter
@ToString
@NoArgsConstructor
public class TenantCompanyDetailVO extends CompanyVO {

    @Schema(description = "HR 登录密码", example = "123456")
    private String password;

    @Schema(description = "公司地址", example = "南山区 xxx 园区 xx 栋 15 楼 1508")
    private String address;

    @Schema(description = "是否已经停止供餐（停止供餐时该值为 true）", example = "false")
    private Boolean stopFlag;

    @Schema(description = "公司图片链接")
    private TenantCompanyImageVO images;

    @Schema(description = "公司午餐配置信息")
    private TenantCompanyDeliveryInfoVO lunchSetting;

    @Schema(description = "公司晚餐配置信息")
    private TenantCompanyDeliveryInfoVO dinnerSetting;

    public TenantCompanyDetailVO(Company company) {
        super(company.getId(), company.getName(), company.getHrName(), company.getPhoneNumber());
        this.address = company.getAddress();
        this.password = company.getPassword();
        this.stopFlag = company.getStopFlag();
    }
}
